package ph.com.gs3.formalistics.presenter.fragments.views;

import java.util.ArrayList;
import java.util.List;

import ph.com.gs3.formalistics.R;
import ph.com.gs3.formalistics.global.dummy.DummyUsers;
import ph.com.gs3.formalistics.model.valueobjects.application.Notification;
import ph.com.gs3.formalistics.model.valueobjects.application.RequestNotification;
import ph.com.gs3.formalistics.model.valueobjects.business.User;
import ph.com.gs3.formalistics.presenter.adapters.NotificationListItemViewAdapter;
import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

public class NotificationViewFragment extends Fragment {

	private NotificationViewActionListener actionListener;

	private NotificationListItemViewAdapter adapter;

	private ListView lvNotificationsContainer;

	@Override
	public void onAttach(Activity activity) {
		super.onAttach(activity);

		actionListener = (NotificationViewActionListener) activity;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

		View rootView = inflater.inflate(R.layout.fragment_notification, container, false);

		adapter = new NotificationListItemViewAdapter(getActivity());

		lvNotificationsContainer = (ListView) rootView
		        .findViewById(R.id.Notifications_lvNotificationsContainer);

		lvNotificationsContainer.setAdapter(adapter);

		return rootView;

	}

	public void setNotifications(List<Notification> notifications) {
		adapter.setNotifications(notifications);
	}

	public static interface NotificationViewActionListener {

	}

}
